﻿using System;
using System.Collections.Generic;
using System.Text;

namespace daSyntaxAnalyser.SyntaxTree
{
    using daBase.Objects;

    public class RecordConstValueElement : IdElement
    {
        private ISyntaxTreeElement value;

        public ISyntaxTreeElement Value { get { return value; } set { this.value = value; } }

        public RecordConstValueElement(TokenInfo Id, ISyntaxTreeElement Value, List<TokenInfo> Comments)
            : base(Id, Comments)
        {
            value = Value;
        }

        public override string ToString()
        {
            return string.Format("{0}:{1}", base.ToString(), value);
        }

        protected override IEnumerator<ISyntaxTreeElement> CreateEnumerator()
        {
            yield return value;
        }
    }
}
